package com.atcjx.service;

import com.atcjx.mapper.FileMapper;
import com.atcjx.pojo.Article.Article;
import com.atcjx.pojo.Article.ArticleVO;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author admin
 * @version 1.0.0
 * @ClassName FileServiceImpl.java
 * @Description TODO
 * @createTime 2021年10月10日 15:57:00
 */
@Service
public class FileServiceImpl {
    @Autowired
    FileMapper fileMapper;

    public Object getPic(int page,int limit){
        PageHelper.startPage(page,limit);
        List<String> pic = fileMapper.getPic();
        PageInfo pageInfo=new PageInfo(pic);
        return pageInfo;
    }

    public void deleteImgByURL(String url){
        fileMapper.deletePic(url);
    }
}
